/*
 * @Author: 肖思汗 
 * @Date: 2025-06-05 10:21:01 
 * @Last Modified by: 肖思汗
 * @Last Modified time: 2025-06-14 16:26:18
 */

import { cloneDeep } from "lodash";
import Api from "src/api/Api";

//分类页面的接口
class CategoryApi extends Api {

    constructor() {
        super();
    }

    queryParam = {
        pageNum: 1,
        pageSize: 10,
        productName: "",                  // 商品名称
        firstProductTypeId: 0,            // 一级分类
        secondProductTypeIds: [0],         // 二级分类
        priceZones: [                    // 价格带
            {
                min: 1,
                max: 2
            }
        ]
    }

    //分类查询
    queryCategoryProduct(params: typeof this.queryParam) {
        const { pageNum, pageSize, ...otherParams } = params;
        return this._post(`/category/page/queryCategoryProduct?pageNum=${pageNum}&pageSize=${pageSize}`, params);
    }


}

const categoryApi = new CategoryApi();

export default categoryApi;